import java.util.*;

public class URLsManager {

	protected Vector<String> strURLs;

	URLsManager() {
		strURLs = new Vector<String>();
	}

	public synchronized String getStrURLsValue() throws InterruptedException {
		String strURL;
		while (strURLs.isEmpty()){
			wait();
		}

		strURL = strURLs.get(0);
		if (strURL != null) strURLs.remove(0);
		return strURL;
	}

	public synchronized void setStrURLsValue(String strURL) {
		strURLs.add(strURL);
		notifyAll();
	}
}
